package com.situ.mall.web.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mall.common.util.JsonResult;
import com.situ.mallbrand.model.Brand;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 品牌服务 Feign 客户端
 */
@FeignClient(name = "brand-api", path = "/api/brands", contextId = "brand-api")
public interface BrandFeignService {

    /**
     * 创建品牌
     */
    @PostMapping
    JsonResult<Boolean> create(@RequestBody Brand brand);

    /**
     * 更新品牌
     */
    @PutMapping("/{id}")
    JsonResult<Boolean> updateById(@PathVariable("id") Long id, @RequestBody Brand brand);

    /**
     * 品牌列表查询（分页、搜索）
     */
    @GetMapping
    JsonResult<Page<Brand>> list(@RequestParam(value = "keyword", required = false) String keyword,
                                 @RequestParam(value = "status", required = false) Integer status,
                                 @RequestParam(value = "page", defaultValue = "1") Integer page,
                                 @RequestParam(value = "size", defaultValue = "10") Integer size);

    /**
     * 删除品牌（软删除）
     */
    @DeleteMapping("/{id}")
    JsonResult<Boolean> delete(@PathVariable("id") Long id);
} 